{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "988e2563",
   "metadata": {},
   "source": [
    "# 会员输入效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3c37a83b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入您的账号：hhjhj\n",
      "请输入您的密码：55656\n",
      "您输入的账号或密码不正确，请重新输入,您还有 2 次机会~~加油~~~\n",
      "请输入您的账号：jshbduhs\n",
      "请输入您的密码：5456465\n",
      "您输入的账号或密码不正确，请重新输入,您还有 1 次机会~~加油~~~\n",
      "请输入您的账号：huanmin\n",
      "请输入您的密码：996996\n",
      "欢迎我们尊贵的会员%s登录系统使用~\n",
      "尊贵的会员，您还有 9 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 8 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 7 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 6 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 5 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 4 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 3 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 2 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 1 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，您还有 0 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "尊贵的会员，今日次数已经到极限了哦~明天再来吧~\n",
      "不是吧不是吧，都输了三次了还不对啊！别输了，2分钟之后再来吧\n"
     ]
    }
   ],
   "source": [
    "# Anthor:huanmin\n",
    "# 时间：10.04-week04\n",
    "# 要求：优化课程表，增加用户输入，输入指定时间格式，输出对应的课程表。登录时判断（非会员每天可以使用5次，会员可以使用10次）\n",
    "# 重点步骤：1、用户输入时判断账号密码是否正确 2、用户输入时判断会员与非会员（关系到一天使用次数）3、输入指定时间，输出对应时间课表\n",
    "\n",
    "user_data_vip = [\"huanmin\"]                         # 模拟数据库数据中的会员名单\n",
    "user_data = ['pengyuyan']                           # 模拟数据库数据中的普通用户\n",
    "password_data = \"123456\"                               # 所有用户密码\n",
    "password_data_vip = \"996996\"\n",
    "count = 3\n",
    "while True:\n",
    "    count -= 1\n",
    "    # 用户输入数据\n",
    "    username = input(\"请输入您的账号：\")\n",
    "    password = input(\"请输入您的密码：\")\n",
    "    if username in user_data_vip:\n",
    "            if password == password_data_vip:\n",
    "             # 占位符%s\n",
    "             print(\"欢迎我们尊贵的会员%s登录系统使用~\" )\n",
    "             count = 10\n",
    "             while True:\n",
    "                if count == 0:\n",
    "                    print(\"尊贵的会员，今日次数已经到极限了哦~明天再来吧~\")\n",
    "                    break\n",
    "                else:\n",
    "                    count -= 1\n",
    "                    print(\"尊贵的会员，您还有\", count, \"次查询机会\")\n",
    "\n",
    "                import datetime\n",
    "                time = datetime.date.today().weekday()\n",
    "                one_weekingday = int(time)\n",
    "                print(one_weekingday)\n",
    "                if one_weekingday == 0:\n",
    "                  print(\"星期一\")\n",
    "                  print(\"6-7写作训练 周秀梅\")\n",
    "                  print(\"8-10创业基础实践 高进\")\n",
    "                elif one_weekingday == 1:\n",
    "                  print(\"星期二\")\n",
    "                  print(\"早八早八早八啊啊啊\")\n",
    "                  print(\"1-3用户研究 宋歌\")\n",
    "                  print(\"8-9h5互动技术与应用 游鸽\")\n",
    "                elif one_weekingday == 2:\n",
    "                  print(\"星期三\")\n",
    "                  print(\"早八早八早八啊啊啊\")\n",
    "                  print(\"1-2户外体育游戏 赵培刚\")\n",
    "                  print(\"4-5大学英语 王劼\")\n",
    "                elif one_weekingday == 3:\n",
    "                  print(\"星期四\")\n",
    "                  print(\"3-5 python语言 许智超\")\n",
    "                elif one_weekingday == 4:\n",
    "                  print(\"星期五\")\n",
    "                  print(\"早八早八早八啊啊啊\")\n",
    "                  print(\"1-2AI软件应用 阚凤霞\")\n",
    "                  print(\"8-9大学英语 王劼\")\n",
    "                else:\n",
    "                  print(\"周末大休息！！！\")\n",
    "                  print(\"ING\")\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "    if username in user_data:\n",
    "            if password == password_data : # 非会员\n",
    "             # 占位符%s\n",
    "             print(\"欢迎%s登录系统使用~\")\n",
    "             count = 5\n",
    "             while True:\n",
    "                 if count == 0:\n",
    "                     print(\"今日次数已经到极限了哦~您今日有五次查看课表机会哟~如需更多查看机会，请开通会员~\")\n",
    "                     break\n",
    "                 else:\n",
    "                     count -= 1\n",
    "                     print(\"您还有\", count, \"次查询机会\")\n",
    "\n",
    "                 import datetime\n",
    "                 time = datetime.date.today().weekday()\n",
    "                 one_weekingday = int(time)\n",
    "                 print(one_weekingday)\n",
    "                 if one_weekingday == 0:\n",
    "                   print(\"星期一\")\n",
    "                   print(\"6-7写作训练 周秀梅\")\n",
    "                   print(\"8-10创业基础实践 高进\")\n",
    "                 elif one_weekingday == 1:\n",
    "                   print(\"星期二\")\n",
    "                   print(\"早八早八早八啊啊啊\")\n",
    "                   print(\"1-3用户研究 宋歌\")\n",
    "                   print(\"8-9h5互动技术与应用 游鸽\")\n",
    "                 elif one_weekingday == 2:\n",
    "                   print(\"星期三\")\n",
    "                   print(\"早八早八早八啊啊啊\")\n",
    "                   print(\"1-2户外体育游戏 赵培刚\")\n",
    "                   print(\"4-5大学英语 王劼\")\n",
    "                 elif one_weekingday == 3:\n",
    "                   print(\"星期四\")\n",
    "                   print(\"3-5 python语言 许智超\")\n",
    "                 elif one_weekingday == 4:\n",
    "                   print(\"星期五\")\n",
    "                   print(\"早八早八早八啊啊啊\")\n",
    "                   print(\"1-2AI软件应用 阚凤霞\")\n",
    "                   print(\"8-9大学英语 王劼\")\n",
    "                 else:\n",
    "                   print(\"周末大休息！！！\")\n",
    "                   print(\"ING\")\n",
    "\n",
    "    else:\n",
    "        if count == 0:\n",
    "            print(\"不是吧不是吧，都输了三次了还不对啊！别输了，2分钟之后再来吧\")\n",
    "            break\n",
    "        else:\n",
    "            print(\"您输入的账号或密码不正确，请重新输入,您还有\", count, \"次机会~~加油~~~\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7bc2cb19",
   "metadata": {},
   "source": [
    "# 非会员输入效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d55d237",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入您的账号：pengyuyan\n",
      "请输入您的密码：123456\n",
      "欢迎%s登录系统使用~\n",
      "您还有 4 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "您还有 3 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "您还有 2 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "您还有 1 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "您还有 0 次查询机会\n",
      "2\n",
      "星期三\n",
      "早八早八早八啊啊啊\n",
      "1-2户外体育游戏 赵培刚\n",
      "4-5大学英语 王劼\n",
      "今日次数已经到极限了哦~您今日有五次查看课表机会哟~如需更多查看机会，请开通会员~\n"
     ]
    }
   ],
   "source": [
    "# Anthor:huanmin\n",
    "# 时间：10.04-week04\n",
    "# 要求：优化课程表，增加用户输入，输入指定时间格式，输出对应的课程表。登录时判断（非会员每天可以使用5次，会员可以使用10次）\n",
    "# 重点步骤：1、用户输入时判断账号密码是否正确 2、用户输入时判断会员与非会员（关系到一天使用次数）3、输入指定时间，输出对应时间课表\n",
    "\n",
    "user_data_vip = [\"huanmin\"]                         # 模拟数据库数据中的会员名单\n",
    "user_data = ['pengyuyan']                           # 模拟数据库数据中的普通用户\n",
    "password_data = \"123456\"                               # 所有用户密码\n",
    "password_data_vip = \"996996\"\n",
    "count = 3\n",
    "while True:\n",
    "    count -= 1\n",
    "    # 用户输入数据\n",
    "    username = input(\"请输入您的账号：\")\n",
    "    password = input(\"请输入您的密码：\")\n",
    "    if username in user_data_vip:\n",
    "            if password == password_data_vip:\n",
    "             # 占位符%s\n",
    "             print(\"欢迎我们尊贵的会员%s登录系统使用~\" )\n",
    "             count = 10\n",
    "             while True:\n",
    "                if count == 0:\n",
    "                    print(\"尊贵的会员，今日次数已经到极限了哦~明天再来吧~\")\n",
    "                    break\n",
    "                else:\n",
    "                    count -= 1\n",
    "                    print(\"尊贵的会员，您还有\", count, \"次查询机会\")\n",
    "\n",
    "                import datetime\n",
    "                time = datetime.date.today().weekday()\n",
    "                one_weekingday = int(time)\n",
    "                print(one_weekingday)\n",
    "                if one_weekingday == 0:\n",
    "                  print(\"星期一\")\n",
    "                  print(\"6-7写作训练 周秀梅\")\n",
    "                  print(\"8-10创业基础实践 高进\")\n",
    "                elif one_weekingday == 1:\n",
    "                  print(\"星期二\")\n",
    "                  print(\"早八早八早八啊啊啊\")\n",
    "                  print(\"1-3用户研究 宋歌\")\n",
    "                  print(\"8-9h5互动技术与应用 游鸽\")\n",
    "                elif one_weekingday == 2:\n",
    "                  print(\"星期三\")\n",
    "                  print(\"早八早八早八啊啊啊\")\n",
    "                  print(\"1-2户外体育游戏 赵培刚\")\n",
    "                  print(\"4-5大学英语 王劼\")\n",
    "                elif one_weekingday == 3:\n",
    "                  print(\"星期四\")\n",
    "                  print(\"3-5 python语言 许智超\")\n",
    "                elif one_weekingday == 4:\n",
    "                  print(\"星期五\")\n",
    "                  print(\"早八早八早八啊啊啊\")\n",
    "                  print(\"1-2AI软件应用 阚凤霞\")\n",
    "                  print(\"8-9大学英语 王劼\")\n",
    "                else:\n",
    "                  print(\"周末大休息！！！\")\n",
    "                  print(\"ING\")\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "    if username in user_data:\n",
    "            if password == password_data : # 非会员\n",
    "             # 占位符%s\n",
    "             print(\"欢迎%s登录系统使用~\")\n",
    "             count = 5\n",
    "             while True:\n",
    "                 if count == 0:\n",
    "                     print(\"今日次数已经到极限了哦~您今日有五次查看课表机会哟~如需更多查看机会，请开通会员~\")\n",
    "                     break\n",
    "                 else:\n",
    "                     count -= 1\n",
    "                     print(\"您还有\", count, \"次查询机会\")\n",
    "\n",
    "                 import datetime\n",
    "                 time = datetime.date.today().weekday()\n",
    "                 one_weekingday = int(time)\n",
    "                 print(one_weekingday)\n",
    "                 if one_weekingday == 0:\n",
    "                   print(\"星期一\")\n",
    "                   print(\"6-7写作训练 周秀梅\")\n",
    "                   print(\"8-10创业基础实践 高进\")\n",
    "                 elif one_weekingday == 1:\n",
    "                   print(\"星期二\")\n",
    "                   print(\"早八早八早八啊啊啊\")\n",
    "                   print(\"1-3用户研究 宋歌\")\n",
    "                   print(\"8-9h5互动技术与应用 游鸽\")\n",
    "                 elif one_weekingday == 2:\n",
    "                   print(\"星期三\")\n",
    "                   print(\"早八早八早八啊啊啊\")\n",
    "                   print(\"1-2户外体育游戏 赵培刚\")\n",
    "                   print(\"4-5大学英语 王劼\")\n",
    "                 elif one_weekingday == 3:\n",
    "                   print(\"星期四\")\n",
    "                   print(\"3-5 python语言 许智超\")\n",
    "                 elif one_weekingday == 4:\n",
    "                   print(\"星期五\")\n",
    "                   print(\"早八早八早八啊啊啊\")\n",
    "                   print(\"1-2AI软件应用 阚凤霞\")\n",
    "                   print(\"8-9大学英语 王劼\")\n",
    "                 else:\n",
    "                   print(\"周末大休息！！！\")\n",
    "                   print(\"ING\")\n",
    "\n",
    "    else:\n",
    "        if count == 0:\n",
    "            print(\"不是吧不是吧，都输了三次了还不对啊！别输了，2分钟之后再来吧\")\n",
    "            break\n",
    "        else:\n",
    "            print(\"您输入的账号或密码不正确，请重新输入,您还有\", count, \"次机会~~加油~~~\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
